//
//  ZLTogetherLearnModel.m
//  ZLExamination
//
//  Created by Zheng on 2017/9/8.
//  Copyright © 2017年 Zheng. All rights reserved.
//

#import "ZLTogetherLearnModel.h"

@implementation ZLTogetherLearnModel

- (void)setAttributes:(NSDictionary *)dataDic {
    [super setAttributes:dataDic];
    
    self.u_id = dataDic[@"id"];
    
    CGFloat p = [[NSString stringWithFormat:@"%.2f",self.learning_number.floatValue / self.chapter_number.floatValue] floatValue];
    
    p = p >= 1 ? 1:p;
    
    self.percent = p;
    
}

@end
